package com.xiaow.utils;

public class SingleTest {
    private static SingleTest singleTest;
    private SingleTest(){

    }
    public static SingleTest single(){
        if(singleTest==null){
            singleTest=new SingleTest();
        }
        return singleTest;
    }

    public static void main(String[] args) {
        System.out.println(SingleTest.single());
        new Thread(){
            @Override
            public void run() {
                System.out.println(SingleTest.single());
            }
        }.start();
    }
}
